//$Id:  $
//$Date:  $
//$Author:  $
package com.ajaxit.prisa.struts;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessages;

public class SalidaUsuarioAction extends Action {
	private static final long serialVersionUID = 1L;

	public ActionForward execute ( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response ) throws Exception {
        HttpSession session = request.getSession ( );
        session.removeAttribute ( "user" );
        session.removeAttribute ( "interventor" );
        session.removeAttribute ( "interventores" );
        session.removeAttribute ( "proyecto" );
        session.removeAttribute ( "proyectoss" );
        session.removeAttribute ( "modulos" );
        session.invalidate ( );
		return mapping.findForward ( "success" );
	}

	private ActionForward sendError ( ActionMapping mapping, HttpServletRequest request, ActionMessages errors ) {
		saveErrors ( request, errors );
		return new ActionForward ( mapping.getInput ( ) );
	}
}
//$Revision:  $
